projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
357db76
)
Plug a small memory leak
author
Matthias Clasen
<mclasen@redhat.com>
Thu, 13 Sep 2012 04:14:16 +0000
(
00:14
-0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Thu, 13 Sep 2012 04:14:16 +0000
(
00:14
-0400)
gtk/deprecated/gtkstyle.c
patch
|
blob
|
history
diff --git
a/gtk/deprecated/gtkstyle.c
b/gtk/deprecated/gtkstyle.c
index d6ea17e80a48ec5fbdbbe35513449e67e7055d87..c981aaa8dd7e20cac94f5950ad3c12863bfafef3 100644
(file)
--- a/
gtk/deprecated/gtkstyle.c
+++ b/
gtk/deprecated/gtkstyle.c
@@
-655,9
+655,15
@@
set_color_from_context (GtkStyle *style,
break;
}
- if (!color
|| !(color->alpha > 0.01)
)
+ if (!color)
return FALSE;
+ if (!(color->alpha > 0.01))
+ {
+ gdk_rgba_free (color);
+ return FALSE;
+ }
+
dest->pixel = 0;
dest->red = CLAMP ((guint) (color->red * 65535), 0, 65535);
dest->green = CLAMP ((guint) (color->green * 65535), 0, 65535);